package cn.bos.quartz;

import cn.bos.service.take_delivery.WayBillService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

/**
 * 任务定时器spring task 测试
 */

@Service
public class IndexTask {
	@Autowired
	private WayBillService wayBillService;

	@Scheduled(cron = "2 0/2 * * * ?")
	public void updateIndex() {
		System.out.println("自动更新索引");
		wayBillService.updateIndex();
	}
}
